<?php
/* @var $this CategoryController */
$this->layout = '//layouts/admin/category';
$this->pageTitle = $model->isNewRecord ? '创建分类' : '修改分类' . '【'.$model->screen_name.'】';
$this->breadcrumbs=array(
	'Category',
);
?>
<div class="container-fluid" style='margin-top: 50px;'>
    <div class='span3'></div>
    <div class='span6 well'>

      <?php $form=$this->beginWidget('CActiveForm', array(
            'id'=>'category-form',
            'enableAjaxValidation'=>true,
            'htmlOptions'=>array(
                'class'=>'form-horizontal',
            )
        )); ?>
        <fieldset>
            <div id="legend" class="">
              <legend class="">创建分类</legend>
            </div>
            <div class="control-group">
                <?php echo $form->labelEx($model,'name',array('class'=>'')); ?>
                <div class="">
                    <?php echo $form->textField($model,'name',array('class'=>'span6','placeholder'=>'输入分类名称')); ?>
                    <?php echo $form->error($model,'name',array('class'=>'alert')); ?>
                </div>
            </div>
            <div class="control-group">
                <?php echo $form->labelEx($model,'screen_name',array('class'=>'')); ?>
                <div class="">
                    <?php echo $form->textField($model,'screen_name',array('class'=>'span6','placeholder'=>'输入分类别名')); ?>
                    <?php echo $form->error($model,'screen_name',array('class'=>'alert')); ?>
                </div>
            </div>
            <div class="control-group">
                <?php echo $form->labelEx($model,'category',array('class'=>'')); ?>
                <div class="">
                    <?php echo $form->dropDownList($model,'category',$category); ?>
                    <?php echo $form->error($model,'category',array('class'=>'alert')); ?>
                </div>
            </div>
            <div class="control-group">
                <div class="">
                    <?php echo CHtml::submitButton($model->isNewRecord ? '创建分类' : '保存分类',array('class'=>'btn btn-primary')); ?>
                </div>
            </div>
        </fieldset>
        <?php $this->endWidget();?>
    </div>
    <div class='span3'></div>
</div>
